Add comprehensive test suite for ~100% coverage#6
Conversation
- Created unit tests for calculator, config, database, display, models, and cmd packages. - Mapped almost all branches, resolving errors and edge cases. - Changed go.mod to go 1.24.3 to allow testing with the GOTOOLCHAIN=local environment. - Setup temporary directories for testing db pathing without polluting user's $HOME. Co-authored-by: tryonlinux <13523516+tryonlinux@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
❌ Test Results: FAILEDTest Output |
The GitHub workflow `pr-tests.yml` was hardcoded to run tests specifically in a `tests/` directory (`go test -v ./tests/...`). Because we moved all unit tests to be adjacent to their respective packages (the standard Go way) and deleted the empty `tests/` folder, the CI failed with `no such file or directory`. This updates the CI to properly discover all tests using `go test -v ./...`. Co-authored-by: tryonlinux <13523516+tryonlinux@users.noreply.github.com>
✅ Test Results: PASSEDTest Output |
This PR implements a comprehensive test suite for the
davedebt tracking CLI, bringing the total test statement coverage to over 96%. All major code paths and packages (calculator,config,database,display,models,cmd, andmain) are now covered by unit tests. The only untested lines remaining are non-mockable driver errors oros.Exit(1)calls.PR created automatically by Jules for task 15610309889281664851 started by @tryonlinux